import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *


testCase="DBshop018_删除属性组"
# 打开网址
firefox=openBrowser(urlAdmin)
#调用自定义函数进行后台的登录
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,"商品管理","商品属性","属性分组")
firefox.find_element_by_xpath("//td[text()='咕咕咕']/following-sibling::td[2]/a[2]").click()
firefox.switch_to_alert().accept()
time.sleep(4)
#断言
try:
    firefox.find_element_by_xpath("//td[text()='咕咕咕']")
    writeLog("%s 测试失败"%testCase)
    getPhoto(firefox)
except:
    writeLog("%s 测试通过" % testCase)

